< previous page page_22 next page >

Page 22
tip.gif
You can save a single project component individually by selecting the component in the Project Explorer and choosing File, Save (component name) in the menu system, or by right-clicking the component in the Project Explorer and choosing Save (component name) from the context menu that appears. You can also save a component with a different filename than it was originally saved under by using one of these methods and selecting the Save (component name) As option.

Saving the Loan Calculator Project
Now let's save the sample Loan Calculator project. Choose File, Save Project, or click the Save Project button on the toolbar. You will first be prompted to save your application's one form (Form1). This displays the Save File As dialog box so you can specify the name and location of your application's files:
The File Name text box is used to name the file where the component will be stored. In the example, the default filename of Form1.frm is presented. Change the filename to the more descriptive LoanCalcMain. You don't need to add the file extension .FRM; it will be automatically appended to the filename you enter.
The Save In drop-down list box at the top of the dialog box enables you to specify the location where the component should be stored. If nothing has been saved during this Visual Basic session, a default folder (usually the folder where Visual Basic resides) will be presented. Use the Save In drop-down list box to navigate to the folder where you want to store the files that make up this application. If necessary, you can use the Create New Folder button to make a new folder for the project.
CAUTION
Never save your application's component files in the same folder as Visual Basic's program files. It's usually good practice for an application to have its own folder.

For the purposes of this example, navigate to the root of your hard drive, use the Create New Folder button to make a new folder, and change the folder's name from New Folder to LoanCalc. Then double-click the LoanCalc folder to make it current, and click Save to complete the operation.
After you've saved the form, you'll be presented with the Save Project As dialog box, where you can specify the name and location of the project file. The default location should now be the same location where you saved the form file. Change the suggested filename Project1.vbp to Loan Calculator (the extension .VBP, for Visual Basic Project, will be added for you). Click Save to finish.
Now that you've laid out the application's infrastructure and named and saved its files, you're ready to begin true development. Of course, in order for your program to process data, you need to plan how to get the necessary data from the user.
note.gif Depending upon the options that were chosen when Visual Studio was installed, you may be presented with a dialog box asking if you want to add the project to SourceSafe.

 
< previous page page_22 next page >